<?php
  //前台控制器
  namespace Home\Controller;
  use Think\Controller;  //引入空间类元素
  class GoodsController extends Controller{
  	function showlist(){
  	echo $this->hot();
  	$this->display();
  }
  //商品详情
  function detail($id){
    $User = M('goods');
     $list = $User->where("goods_id=$id")->select();
     $this->assign('list',$list);
     $this->display();
  	//$this->display();
  }
  
  function category(){
     $User = M('goods');
     $list = $User->limit(10)->select();
     $this->assign('list',$list);
     $this->display();
    
  }
  //当前热卖商品
  function hot(){
  	 $User = M('goods');
     $list1 = $User->limit(10)->select();
     $this->assign('list1',$list1);
     $this->display();
  }

}





